@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">用户管理</a>
            <em> > </em>
            <a href="#">用户列表</a>
        </div>
        <!-- cur-position end -->

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>头像</th>
                    <th>昵称</th>
                    <th>用户名</th>
                    <th>真实姓名</th>
                    <th>星座</th>
                    <th>地区</th>
                    <th>性别</th>
                    <th>阅读币</th>
                    <th>特殊设置</th>
                    <th>创建时间</th>
                    <th>账户状态</th>
                </tr>
                </thead>
                <tbody id="fansinfo">
                @if(count($users) > 0)
                    @foreach($users as $user)
                        <tr>
                            <td>{{$user->id}}</td>
                            <td class="account-td" style="width: 20px;">
                        <span class="photo">
                            <img src="{{$user->userInfo->photo_url}}" alt="">
                        </span>
                            </td>
                            <td>
                                <div class="info-box">
                                    <p>
                                        <span class="icon icon-rzh"></span>
                                        <span class="name">@if($user->userInfo){{$user->userInfo->nickname}}@endif</span>
                                        <img class="sex" src="{{url('/images/admin/girl.gif')}}" alt="" style="">
                                    </p>
                                </div>
                            </td>
                            <td>{{$user->phone}}</td>
                            <td>@if($user->userInfo){{$user->userInfo->realname}}@endif</td>
                            <td>@if($user->userInfo){{$user->userInfo->constellation}}@endif</td>
                            <td>@if($user->userInfo){{$user->userInfo->province}}{{$user->userInfo->city}}{{$user->userInfo->area}}@endif</td>
                            <td>
                                @if($user->userInfo)
                                    @if($user->userInfo->sex == 1)
                                        男
                                    @else
                                        女
                                    @endif
                                @endif
                            </td>
                            <td>@if($user->userInfo){{$user->userInfo->books_coin}} @endif</>
                            <td>{{$user->created_at}}</td>
                            <td>@if((int)$user->status == 0)<span class="color3">锁定</span> @elseif((int)$user->status == 1)<span class="color4">正常</span>@endif</td>
                            {{--<td><a class="btnLump btnLump1" href="">删除｜锁定</a></td>--}}
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
            <?php echo $users->render(); ?>
        </div>
    </div>
    <!-- content end -->

@endsection